﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MethodWorx.Core.DomainModel;

namespace MethodWorx.CMS.Plugins
{
    public interface IPluginUserDataRepository : IRepository<PluginUserData>
    {
        /// <summary>
        /// Find the user data for the given plugin, entity and type
        /// </summary>
        /// <param name="plugin"></param>
        /// <param name="entity"></param>
        /// <param name="userDataName"></param>
        /// <returns></returns>
        PluginUserData FindPluginUserData(IPlugin plugin, AggregateRoot entity, string userDataType);
        /// <summary>
        /// Find all plugin userr data for a given entity, plugin and type
        /// </summary>
        /// <param name="plugin"></param>
        /// <param name="entity"></param>
        /// <param name="userDataType"></param>
        /// <returns></returns>
        IEnumerable<PluginUserData> FindAllPluginUserData(IPlugin plugin, AggregateRoot entity, string userDataType);
        /// <summary>
        /// Find all plugin user data for a specific entity
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        IEnumerable<PluginUserData> FindAllPluginUserData(AggregateRoot entity);
    }
}
